import React, { Component } from 'react'
import { InewType } from '@/utils/interface'
import { useLocation } from 'umi'
const questionDetail: React.FC = () => {
    const location: { state: InewType } = useLocation()
    console.log(location)
    return (
        <div>
            <h1>试题详情</h1>
            <div>
                <p>出题人：{location.state.user_name}</p>
                <h3>题目信息</h3>
                <p>
                    <span>{location.state.questions_type_text}</span>
                    <span>{location.state.subject_text}</span>
                    <span>{location.state.exam_name}</span>
                </p>
                <p>{location.state.title}</p>
                {location.state.questions_stem}
            </div>
            <div>
        <p>答案信息</p>
        <div>
        {location.state.questions_answer}
        </div>
      </div>
        </div>
    )
}
export default questionDetail
